<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
<beans>

	<bean id="baseTransactionProxy"
		class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
		abstract="true">
		<property name="transactionManager">
			<ref local="transactionManager" />
		</property>
		<property name="transactionAttributes">
			<props>
				<prop key="restoreSystem*">
					PROPAGATION_NOT_SUPPORTED,ISOLATION_READ_COMMITTED,-ExceptionCommon
				</prop>
				<prop key="*">
					PROPAGATION_REQUIRED,ISOLATION_READ_COMMITTED,-ExceptionCommon
				</prop>
			</props>
		</property>
	</bean>
	<bean id="transactionManager"
		class="org.springframework.orm.hibernate3.HibernateTransactionManager">
		<property name="sessionFactory">
			<ref bean="sessionFactory" />
		</property>
		<property name="transactionSynchronization">
			<value>1</value>
		</property>
	</bean>





	<bean id="functionService" parent="baseTransactionProxy">
		<property name="target">
			<bean class="com.jd.ty.service.FunctionService">
				<property name="functionDAO">
					<ref bean="functionDAO" />
				</property>
			</bean>
		</property>
	</bean>
	<bean id="dictionaryService" parent="baseTransactionProxy">
		<property name="target">
			<bean class="com.jd.ty.service.DictionaryService">
				<property name="dictionaryDAO">
					<ref bean="dictionaryDAO" />
				</property>
			</bean>
		</property>
	</bean>
	<bean id="userService" parent="baseTransactionProxy">
		<property name="target">
			<bean class="com.jd.ty.service.UserService">
				<property name="userDAO">
					<ref bean="userDAO" />
				</property>
				<property name="functionDAO">
					<ref bean="functionDAO" />
				</property>
				<property name="permissionDAO">
					<ref bean="permissionDAO" />
				</property>
			</bean>
		</property>
	</bean>
	<bean id="employeeService" parent="baseTransactionProxy">
		<property name="target">
			<bean class="com.jd.ty.service.EmployeeService">
				<property name="userDAO">
					<ref bean="userDAO" />
				</property>
				<property name="employeeDAO">
					<ref bean="employeeDAO" />
				</property>
				<property name="dictionaryDAO">
					<ref bean="dictionaryDAO" />
				</property>
				<property name="roleDAO">
					<ref bean="roleDAO" />
				</property>
			</bean>
		</property>
	</bean>
	<bean id="roleService" parent="baseTransactionProxy">
		<property name="target">
			<bean class="com.jd.ty.service.RoleService">
				<property name="roleDAO">
					<ref bean="roleDAO" />
				</property>
				<property name="userDAO">
					<ref bean="userDAO" />
				</property>
				<property name="permissionDAO">
					<ref bean="permissionDAO" />
				</property>
				<property name="functionDAO">
					<ref bean="functionDAO" />
				</property>

			</bean>
		</property>
	</bean>
	<bean id="customerCompanyService" parent="baseTransactionProxy">
		<property name="target">
			<bean class="com.jd.ty.service.CustomerCompanyService">
				<property name="customerCompanyDAO">
					<ref bean="customerCompanyDAO" />
				</property>
				<property name="customerDAO">
					<ref bean="customerDAO" />
				</property>
				<property name="projectAttrbuteDAO">
					<ref bean="projectAttrbuteDAO" />
				</property>
				<property name="logDAO">
					<ref bean="logDAO" />
				</property>
			</bean>
		</property>
	</bean>

	<bean id="customerOrderService" parent="baseTransactionProxy"
		scope="session">
		<property name="target">
			<bean class="com.jd.ty.service.CustomerOrderService">
				<property name="customerCompanyDAO">
					<ref bean="customerCompanyDAO" />
				</property>
				<property name="customerDAO">
					<ref bean="customerDAO" />
				</property>
				<property name="projectAttrbuteDAO">
					<ref bean="projectAttrbuteDAO" />
				</property>
				<property name="orderDAO">
					<ref bean="orderDAO" />
				</property>
				<property name="dictionaryDAO">
					<ref bean="dictionaryDAO" />
				</property>
				<property name="employeeDAO">
					<ref bean="employeeDAO" />
				</property>
				<property name="customerCompanyService">
					<ref bean="customerCompanyService" />
				</property>
			</bean>
		</property>
	</bean>
	<bean id="projectService" parent="baseTransactionProxy">
		<property name="target">
			<bean class="com.jd.ty.service.ProjectService">
				<property name="projectAttrbuteDAO">
					<ref bean="projectAttrbuteDAO" />
				</property>
			</bean>

		</property>
	</bean>
	<bean id="exportService" parent="baseTransactionProxy">
		<property name="target">
			<bean class="com.jd.ty.service.ExportService">
				<property name="fieldDAO">
					<ref bean="fieldDAO" />
				</property>
				<property name="excelWriter">
					<ref bean="excelWriter" />
				</property>
			</bean>
		</property>
	</bean>
	<bean id="excelWriter" class="com.ty.xsl.writer.ExcelWriter">
	</bean>
</beans>
